#pragma once
#include <iostream>
#include <pthread.h>

namespace ns_task
{
    class task
    {
    public:
        task()
        {}

        task(int a, int b)
        :_a(a)
        ,_b(b)
        {}
        void run()
        {
            std::cout << "tid: " << pthread_self() << "; result: "<< _a << "+" << _b << "=" << _a + _b << std::endl;
        }

        void operator()()
        {
            run();
        }
    private:
        int _a;
        int _b;
    };
}